package com.unknowpupil.design.prototype;

import java.util.Date;

/**
 * @Description:
 * <p>
 *   深克隆，地址也克隆一份。
 * </p>
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2020/4/24 21:32
 * @Classname: Client
 * @Version: 1.0
 */
public class Client1 {
    public static void main(String[] args) throws CloneNotSupportedException {
        Sheep s1 = new Sheep("多利他妈",new Date());
        System.out.println(s1);
        System.out.println(s1.getSname());
        System.out.println(s1.getBrithday());


        Sheep s2 =   (Sheep) s1.clone();
        System.out.println(s2);
        System.out.println(s2.getSname());
        System.out.println(s2.getBrithday());
    }
}
